package app.Disthanitian.thaistyle.EmerMez;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

import android.util.Log;

public class MemberUserLog {
	private String user_id;
	private String timeLog;
	private String dateLog;
	private String latitude;
	private String longitude;
	private String status;
	private String isRisk;
	
	
	
	public String getUser_id() {
		return user_id;
	}
	public void setUser_id(String user_id) {
		this.user_id = user_id;
	}
	public String getTimeLog() {
		return timeLog;
	}
	public void setTimeLog(String timeLog) {
		this.timeLog = timeLog;
	}
	public String getDateLog() {
		return dateLog;
	}
	public void setDateLog(String dateLog) {
		this.dateLog = dateLog;
	}
	public String getLatitude() {
		return latitude;
	}
	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}
	public String getLongitude() {
		return longitude;
	}
	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getIsRisk() {
		return isRisk;
	}
	public void setIsRisk(String isRisk) {
		this.isRisk = isRisk;
	}
	
	public void setDataForUpdateLog(MemberUser memUser){
		
				
		Date currentTime = new Date();
		final SimpleDateFormat formatDate =
                new SimpleDateFormat("yyyy-MM-dd");
         final SimpleDateFormat formatTime =
                new SimpleDateFormat("HH:mm:ss");
        //formatDate.setTimeZone(TimeZone.getTimeZone("GMT"));
        //formatTime.setTimeZone(TimeZone.getTimeZone("GMT"));        
        setUser_id(memUser.getId());
        setTimeLog(formatTime.format(currentTime).toString());
        setDateLog(formatDate.format(currentTime).toString());  
        
       
        setLatitude(memUser.getLatitude());
        setLongitude(memUser.getLongitude());
        
        setStatus(memUser.getStatus());
        setIsRisk(memUser.getIsRisk());	
        Log.d("SuperLog",""+getLatitude());
        Log.d("SuperLog",""+getLongitude());
	}
}
